<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="ex142834">gp_distributed_xacts</title>
  <body>
    <p>The <codeph>gp_distributed_xacts</codeph> view contains information about Greenplum Database distributed transactions. A distributed transaction is a transaction
      that involves modifying data on the segment instances. Greenplum's distributed transaction manager ensures that the segments stay in synch. This view allows
      you to see the currently active sessions and their associated distributed transactions.</p>
    <table id="ex142842">
      <title>pg_catalog.gp_distributed_xacts</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/>
        <colspec colnum="2" colname="col2" colwidth="86pt"/>
        <colspec colnum="3" colname="col3" colwidth="85pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1">
              <codeph>distributed_xid</codeph>
            </entry>
            <entry colname="col2">xid</entry>
            <entry colname="col3"/>
            <entry colname="col4">The transaction ID used by the distributed transaction across the
                Greenplum Database array.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>distributed_id</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">The distributed transaction identifier. It has 2 parts — a unique
              timestamp and the distributed transaction number.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>state</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">The current state of this session with regards to distributed
              transactions.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>gp_session_id</codeph>
            </entry>
            <entry colname="col2">int</entry>
            <entry colname="col3"/>
            <entry colname="col4">The ID number of the Greenplum Database session
              associated with this transaction.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>xmin_distributed _snapshot</codeph>
            </entry>
            <entry colname="col2">xid</entry>
            <entry colname="col3"/>
            <entry colname="col4">The minimum distributed transaction number found among all open
              transactions when this transaction was started. It is used for MVCC distributed
              snapshot purposes.</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
